package com.newcoin.xgb.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class ChangeShipAddressDto {

    @NotNull(message = "用户id不能为空")
    private Long userId;

    @NotBlank(message = "令牌不能为空")
    private String token;

    @NotBlank(message = "请传入地址id")
    private String id;

    @NotBlank(message = "请填写真实姓名")
    private String name;

    @NotBlank(message = "请填写手机号")
    @Pattern(regexp = "^[1][3456789][0-9]{9}$", message = "手机号格式错误")
    private String mobile;

    @NotBlank(message = "请填写邮政编码")
    private String postalCode;

    @NotBlank(message = "请填写地区")
    private String area;

    @NotBlank(message = "请填写详细地址")
    private String address;

    @NotNull
    private Boolean isDefault;
}
